import os
from selenium import webdriver
from time import sleep


driver = webdriver.Edge()

file = open("e:\\Desktop\\test.txt",'r',encoding='utf-8')
for line in file:
    cols =line.split(",")
    yhm=cols[0]
    mm=cols[1]
    driver.get("https://leetcode-cn.com/accounts/login/?next=/problemset/all/")
    # driver.find_element_by_css_selector("css-1o8m92c-Item.e19orumq1")
    driver.find_element_by_name("phone").send_keys(yhm)
    driver.find_element_by_name("phone_code").send_keys(mm)
    sleep(3)
    driver.find_element_by_class_name("e4jw0mn0").click()
    sleep(2)
file.close()

